const crypto = require('crypto')
// 加密
const KEY = 'MTils^$~!92'

const md5 = (content) => {
  return crypto.createHash('md5').update(content).digest('hex')
}

const encrypt = (password) => {
  return md5(crypto.createHash('sha256', KEY).update(password).digest('hex'))
}

module.exports = {
  encrypt
}
